<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=iso-iso-8859-1">
<LINK REL="Start" HREF="index.html">
<LINK REL="Contents" HREF="toc.html">
<LINK REL="Prev" HREF="976Adjustingtheminimumdistancebetweenbars.html">
<LINK REL="Next" HREF="981Minutescale.html">
<STYLE TYPE="text/css"><!--
BODY { font-family: serif }
H1 { font-family: sans-serif }
H2 { font-family: sans-serif }
H3 { font-family: sans-serif }
H4 { font-family: sans-serif }
H5 { font-family: sans-serif }
H6 { font-family: sans-serif }
SUB { font-size: smaller }
SUP { font-size: smaller }
PRE { font-family: monospace }
A { text-decoration: none }
--></STYLE>
</HEAD>
<BODY>
<A HREF="toc.html">Contents</A>
<A HREF="976Adjustingtheminimumdistancebetweenbars.html">Previous</A>
<A HREF="981Minutescale.html">Next</A>
<HR NOSHADE>
<H2><A NAME="9_8">9.8 Formatting the scale headers</A></H2>
<P> The scale headers allow you to view up to four different scales at
 the same time. The four basic scales are:</P>
<UL>
<LI> Day scale</LI>
<LI> Week scale</LI>
<LI> Month scale</LI>
<LI> Year scale</LI>
</UL>
<P> You can choose what scale to include and exclude by using the
 SetScale() method. For example, for a detailed gantt you might choose
 to display days and weeks by specifying<DIV class="phpscript"><CODE><FONT
color="#000000"> <FONT color="#0000BB">&nbsp;$graph</FONT><FONT color="#007700">
-&gt;</FONT><FONT color="#0000BB">ShowHeaders</FONT><FONT color="#007700">
(&nbsp;</FONT><FONT color="#0000BB">GANTT_HWEEK&nbsp;</FONT><FONT color="#007700">
|&nbsp;</FONT><FONT color="#0000BB">GANTT_DAY&nbsp;</FONT><FONT color="#007700">);</FONT><FONT
color="#0000BB"></FONT></FONT></CODE></DIV></P>
<P> If you instead wanted &quot;the big picture&quot; it might be enough to show
 year and months by specifying<DIV class="phpscript"><CODE><FONT color="#000000">
 <FONT color="#0000BB">&nbsp;$graph</FONT><FONT color="#007700">-&gt;</FONT><FONT
color="#0000BB">ShowHeaders</FONT><FONT color="#007700">(&nbsp;</FONT><FONT color="#0000BB">
GANTT_YEAR&nbsp;</FONT><FONT color="#007700">|&nbsp;</FONT><FONT color="#0000BB">
GANTT_MONTH&nbsp;</FONT><FONT color="#007700">);</FONT><FONT color="#0000BB"></FONT>
</FONT></CODE></DIV></P>
<P> You can choose freely the combination of scales that you want, but a
 chart must at least have one scale of course.</P>
<P> Once you have decided what level of details you need you can then
 fine tune the exact layout/formatting of each of the enabled scales as
 described below.</P>
<P> These scale header are all accessed through the graph instance
 variables 'scale' as in<DIV class="phpscript"><CODE><FONT color="#000000">
 <FONT color="#0000BB">&nbsp;$graph</FONT><FONT color="#007700">-&gt;</FONT><FONT
color="#0000BB">scale</FONT><FONT color="#007700">-&gt;</FONT><FONT color="#0000BB">
week</FONT></FONT></CODE></DIV></P>
<P> or<DIV class="phpscript"><CODE><FONT color="#000000"> <FONT color="#0000BB">
&nbsp;$graph</FONT><FONT color="#007700">-&gt;</FONT><FONT color="#0000BB">scale</FONT><FONT
color="#007700">-&gt;</FONT><FONT color="#0000BB">day</FONT></FONT></CODE></DIV>
</P>
<P>. All these headers share the following properties.</P>
<UL>
<LI><DIV class="phpscript"><CODE><FONT color="#000000"> <FONT color="#0000BB">
&nbsp;Show</FONT><FONT color="#007700">()</FONT><FONT color="#0000BB"></FONT></FONT>
</CODE></DIV>
<P> Determine if the scale should be shown or not</P>
</LI>
<LI><DIV class="phpscript"><CODE><FONT color="#000000"> <FONT color="#0000BB">
&nbsp;SetFont</FONT><FONT color="#007700">()</FONT><FONT color="#0000BB"></FONT>
</FONT></CODE></DIV>
<P>Font for text in header</P>
</LI>
<LI><DIV class="phpscript"><CODE><FONT color="#000000"> <FONT color="#0000BB">
&nbsp;SetFontColor</FONT><FONT color="#007700">()</FONT><FONT color="#0000BB">
</FONT></FONT></CODE></DIV>
<P> Specify the color of the header text</P>
</LI>
<LI><DIV class="phpscript"><CODE><FONT color="#000000"> <FONT color="#0000BB">
&nbsp;SetStyle</FONT><FONT color="#007700">()</FONT><FONT color="#0000BB"></FONT>
</FONT></CODE></DIV>
<P>Specify what date format should be used, for example in the week
 scale it is possible to show either week number, the start date of the
 week and so on.</P>
</LI>
<LI><DIV class="phpscript"><CODE><FONT color="#000000"> <FONT color="#0000BB">
&nbsp;SetBackgroundColor</FONT><FONT color="#007700">()</FONT><FONT color="#0000BB">
</FONT></FONT></CODE></DIV>
<P>As it says, the background color for the header</P>
</LI>
<LI><DIV class="phpscript"><CODE><FONT color="#000000"> <FONT color="#0000BB">
&nbsp;SetFrameWeight</FONT><FONT color="#007700">()</FONT><FONT color="#0000BB">
</FONT></FONT></CODE></DIV>
<P>The line weight of the box around the scale</P>
</LI>
<LI><DIV class="phpscript"><CODE><FONT color="#000000"> <FONT color="#0000BB">
&nbsp;SetFrameColor</FONT><FONT color="#007700">()</FONT><FONT color="#0000BB">
</FONT></FONT></CODE></DIV>
<P>The line color for the frame</P>
</LI>
<LI><DIV class="phpscript"><CODE><FONT color="#000000"> <FONT color="#0000BB">
&nbsp;SetTitleVertMargin</FONT><FONT color="#007700">()</FONT><FONT color="#0000BB">
</FONT></FONT></CODE></DIV>
<P>The margin, in percent, below and above the title text</P>
</LI>
</UL>
<P> In addition to these methods each scale also has the property 'grid'
 which determines the appearance of grid lines for that specific scale.
 You may modify the appearance of grid lines by the &quot;normal&quot; line
 methods, i.e. SetColor(),SetWeight() SetStyle() and Show(). So for
 example to set the week grid line red you would use<DIV class="phpscript">
<CODE><FONT color="#000000"> <FONT color="#0000BB">&nbsp;$graph</FONT><FONT color="#007700">
-&gt;</FONT><FONT color="#0000BB">scale</FONT><FONT color="#007700">-&gt;</FONT><FONT
color="#0000BB">week</FONT><FONT color="#007700">-&gt;</FONT><FONT color="#0000BB">
grid</FONT><FONT color="#007700">-&gt;</FONT><FONT color="#0000BB">SetColor</FONT><FONT
color="#007700">(</FONT><FONT color="#DD0000">&quot;red&quot;</FONT><FONT color="#007700">
);</FONT><FONT color="#0000BB"></FONT></FONT></CODE></DIV></P>
<P> Each of the scales also have some specific formatting possibilities
 as described below.</P>
<HR NOSHADE>
<A HREF="toc.html">Contents</A>
<A HREF="976Adjustingtheminimumdistancebetweenbars.html">Previous</A>
<A HREF="981Minutescale.html">Next</A>
</BODY>
</HTML>
